-- GENERATED SPELL FOR [Ufuda Giant-Slayer] --


function spell0_30582(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15284,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30582', 590, 1)
end

function spell1_30582(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(16856,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30582', 5263, 1)
end

function spell2_30582(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(15589,pUnit)
pUnit:RegisterEvent('Sorts_30582', 562, 1)
end

function spell3_30582(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(13736,pUnit)
pUnit:RegisterEvent('Sorts_30582', 2000, 1)
end

function Sorts_30582(pUnit, Event)
local choix_sorts_30582 = math.random(0, 3)
if choix_sorts_30582 == 0 then
pUnit:RegisterEvent('spell0_30582', 1, 1)
end
if choix_sorts_30582 == 1 then
pUnit:RegisterEvent('spell1_30582', 1, 1)
end
if choix_sorts_30582 == 2 then
pUnit:RegisterEvent('spell2_30582', 1, 1)
end
if choix_sorts_30582 == 3 then
pUnit:RegisterEvent('spell3_30582', 1, 1)
end
end

function mob30582_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30582', math.random(1500, 3000), 1)
end

function mob30582_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30582_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30582_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30582, 1, 'mob30582_Action')
RegisterUnitEvent(30582, 2, 'mob30582_Leave')
RegisterUnitEvent(30582, 3, 'mob30582_Kill')
RegisterUnitEvent(30582, 4, 'mob30582_Die')
